package com.kt.emall.auth.feign;

import com.kt.common.utils.R;
import com.kt.emall.auth.vo.SocialUser;
import com.kt.emall.auth.vo.UserLoginVO;
import com.kt.emall.auth.vo.UserRegVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @program: e-mall
 * @description: 调用用户模块的远程服务
 * @author: KamTang
 * @create: 2022-01-12 15:15
 **/
@FeignClient("emall-member")
public interface MemberFeignService {

    /**
     * 注册
     * @param userRegVO
     * @return
     */
    @PostMapping("/member/member/register")
    R register(@RequestBody UserRegVO userRegVO);

    /**
     * 登录
     * @param userLoginVO
     * @return
     */
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVO userLoginVO);

    /**
     * 社交应用登录
     * @param socialUser
     * @return
     * @throws Exception
     */
    @PostMapping("/member/member/oauth2/login")
    R oauth2Login(@RequestBody SocialUser socialUser) throws Exception;
}
